package be.djdb.generators.data;

import java.awt.event.ActionListener;
import java.util.LinkedList;
import java.util.List;
import javax.swing.JComponent;
import be.djdb.utils.Projectresources;

public class SuperItemsSingleton {
	protected List<JComponent> tools = new LinkedList<JComponent>();
	protected List<ActionListener> actions = new LinkedList<ActionListener>();
	public static Projectresources resources;
	private static SuperItemsSingleton _instance = null;
    private synchronized static void createInstance (String resourcebunlename) {//gesynchroniseerde !!! multi-threading-problemen!!!te voorkomen
	    if (_instance == null) _instance = new SuperItemsSingleton();
	    resources = new Projectresources(resourcebunlename);
	}
	public static  SuperItemsSingleton getInstance(String resourcebunlename) {
		if (_instance == null) createInstance (resourcebunlename);
        return _instance;
	}
}
